home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / PNL Libraries / Assembly / NoForceQuit.a < prev    next >
Encoding:
Text File  |  1994-11-24  |  555 b   |  41 lines  |  [TEXT/MPS ]

  1.     include    'sysequ.a'
  2.     include    'traps.a'
  3.     proc    
  4.     export    AsmInitNoForceQuit, NoForceQuit
  5.  
  6. ; procedure AsmInitNoForceQuit(sys6byte:ptr; oldsyserror:Ptr);
  7. AsmInitNoForceQuit
  8.     lea    data,a1
  9.     move.l    4(sp),0(a1)
  10.     move.l    8(sp),a0
  11.     move.l    a0,4(a1)
  12.     move.w    #$4EF9,(a0)
  13.     lea    NoForceQuit,a1
  14.     move.l    a1,2(a0)    
  15.  
  16.     _FlushDataCache
  17.     _FlushInstructionCache
  18.  
  19.     move.l    (sp)+,a0
  20.     add.l    #8,sp
  21.     jmp    (a0)
  22.     
  23. ; D0.w = error
  24. NoForceQuit
  25.     cmp.w    #20002,d0
  26.     beq.s    justreturn
  27.     move.l    oldaddr,a0
  28.     jmp    (a0)
  29. justreturn
  30.     rts
  31.  
  32. data
  33. oldaddr    ds.l    1
  34. sysptr    ds.l    1
  35.  
  36.     endp
  37.  
  38.     end
  39.     
  40. asm -wb "{active}"
  41.